package com.asset.modules.assets.service;

import com.asset.modules.assets.model.Asset;
import com.asset.modules.system.model.Company;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author asset
 * @since 2020-08-13
 */
public interface AssetService extends IService<Asset> {

    IPage<Asset> getAssetPage(Page page, Asset asset);

//    Company getCompanyByProjectId(String id);

    /**
     * 字段是否存在
     * @param column
     * @param name
     * @return
     */
    boolean isExist(String column, String name);


    /**
     * 根据项目ID计算年度预算花费
     * @param year
     * @param projectId
     * @return
     */
    double yearlyExpenditure(String year, String projectId);


    /**
     * 根据公司ID获取预算信息
     * @param id
     * @return
     */
    List<Asset> getAssetsByProjectId(String id);
    
}
